<script setup>
import Child from './Child.vue'
import useInit from './composable/useInit.js'

const { data, search } = useInit()
</script>

<template>
  <div>
    <h1>Parent</h1>
    <el-button @click="search({ parent: 'parent' })">Search</el-button>
  </div>
  <ul>
    <li
      v-for="item of data"
      :key="item.id"
    >{{ item.text }}</li>
  </ul>
  <Child :data="data"></Child>
</template>

<style lang="scss" scoped>

</style>